home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 23
/
AACD 23.iso
/
AACD
/
Programming
/
tek
/
msg
/
getmsgsender.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-05-12
|
419b
|
28 lines
#include "tek/msg.h"
#include "tek/kn/exec.h"
#include "tek/kn/sock.h"
/*
** TEKlib
** (C) 2001 TEK neoscientists
** all rights reserved.
**
** TSTRPTR sender = TGetMsgSender(TAPTR msg)
**
** get message sender host.
*/
TSTRPTR TGetMsgSender(TAPTR mem)
{
if (mem)
{
TMSG *msg = ((TMSG *) mem) - 1;
if (msg->sender)
{
return kn_getsockname(((knnetmsg *) msg->sender)->sendername);
}
}
return TNULL;
}